var e = require, t = module, n = exports;

Object.defineProperty(n, "__esModule", {
    value: !0
});

var o = e("GameData"), i = e("Global"), a = function() {
    function e() {}
    return e.getInstance = function() {
        return this._manager || (this._manager = new e()), this._manager;
    }, e.prototype.getItem = function(e) {
        switch (e.type) {
          case 0:
            o.GD.money += e.num;
            break;

          case 1:
            o.GD.diamond += e.num;
            break;

          case 2:
            o.GD.piece += e.num;
            break;

          case 3:
            i.G.christmasItems.push(e);
            break;

          case 4:
            i.G.newYearItems.push(e);
        }
    }, e.prototype.hasItem = function(t) {
        return 3 == t.type ? o.GD.christmasItems.some(function(e) {
            return e.idx == t.idx;
        }) || i.G.christmasItems.some(function(e) {
            return e.idx == t.idx;
        }) : 4 == t.type && (o.GD.newYearItems.some(function(e) {
            return e.idx == t.idx;
        }) || i.G.newYearItems.some(function(e) {
            return e.idx == t.idx;
        }));
    }, e._manager = null, e;
}();

n.default = a;